# python不支持switch
# 只支持if，else

age = int(input('enter you age: '))
if age < 14:
    print('age < 14, free')
else:
    print('age >= 14, not free')

if age % 2 == 0 and age % 3 == 0:
    print('age%6==0')

if (age % 3 == 0 or age % 7 == 0) and (age % 21 != 0):
    print('can divided by 3 or 7, but can\'t divided by 3 and 7 in the same time')

year = int(input('enter year: '))
if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:
    print('闰年')

s = int(input('enter seconds: '))
hours = s // 3600
minutes = s % 3600 // 60
seconds = s % 3600 % 60
print(hours, 'hours', minutes, 'minutes', seconds, 'seconds')

weight = float(input('enter your weight: '))
height = float(input('enter you height: '))
BMI = weight / height ** 2
if 18.5 < BMI < 24.9:
    print('normal')

scores = int(input('scores: '))
if 0 < scores < 60:
    print('不及格')
elif 60 <= scores < 80:
    print('及格良好')
elif 80 <= scores <= 100:
    print('优秀完美')

# if的嵌套
# python使用强制缩进，来表示语句的层次结构
ticket = input('是否买票了？Y/N')
if ticket == 'Y':
    safe = input('是否通过安检了？Y/N')
    if safe == 'Y':
        print('请进站')
    else:
        print('未通过安检')
else:
    print('未买票')

a = age
if a > 18:
    pass  # pass 用于占位，相当于C中的空语句
    # 但此时省略会报错
print('pass')
